package com.example.controller;

import com.example.dto.StoreQueryVO;
import com.example.entity.ResBody;
import com.example.entity.StoreInfo;
import com.example.service.StoreService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/master/api/store/suggest")
public class StoreController {

    @Resource
    private StoreService storeService;

    @PostMapping("/v1")
    public ResBody<List<StoreInfo>> list(@RequestBody StoreQueryVO vo) {
        return ResBody.success(storeService.listByQuery(vo));
    }
}
